<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>中奖名单</title>
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="../../css/aui.css">
     <link rel="stylesheet" href="../../css/common.css">
         <script type="text/javascript" src="../../script/api.js"></script>
    <script language="JavaScript" src="../../script/vue.js"></script>
     <script language="JavaScript" src="../../script/common.js"></script>

    <style>
        .aui-item{
            margin-top: 0.5rem;
            line-height: 2rem;

        }
    </style>
</head>
<body>
  <header class="aui-bar aui-bar-nav" id="header">
      <a class="aui-pull-left aui-btn" onclick="closewin();">
          <span class="aui-iconfont aui-icon-left"></span>
      </a>
      <div class="aui-title">幸运用户</div>
  </header>
<div class="aui-content" id="luck-box">
    <div class="aui-row bgcolor-white" style="line-height: 2rem" >
        <div class="aui-row" v-if="acinfo.acstatus==1">
            活动时间{{acinfo.startdt_fmt}}-{{acinfo.enddt_fmt}}
        </div>
        <div class="aui-row" style="color:#e02e24" v-else>
            活动未结束
        </div>
    </div>

      <div class="aui-row bgcolor-white" style="line-height: 2rem">
          <div class="aui-col-xs-2">幸运儿</div><div class="aui-col-xs-7">订单编号</div><div class="aui-col-xs-3">手机号</div>
          <div class="aui-hr"></div>
      </div>
      <div class="aui-row aui-item  bgcolor-white " v-for="item in lucklist">
          <div class="aui-col-xs-4">{{item.nickname}}</div>
          <div class="aui-col-xs-5">{{item.orderno}}</div>
          <div class="aui-col-xs-3">{{item.mobile}}</div>
      </div>
  </div>

<script language="javascript">
    var vm = new Vue({
            el: '#luck-box',
            data: {
                orderid:'',
                lucklist:[],
                acinfo:{},
            },
            methods:{
               getlucklist:function () {
                   $page.get_data('/api/product/getLuckUser','post',{orderid:this.orderid},function (ret) {
                      vm.lucklist = ret.data.list;
                      vm.acinfo = ret.data.acinfo;
                   });
               }
            }
        }
    );
    apiready=function(){
        $page.init();
      vm.orderid = api.pageParam.orderid;
      vm.getlucklist();
    }
</script>

</body>
</html>
